#pragma once
#include <string>
#include <cstddef> 
#include <odb/core.hxx>


#pragma db object table("friend_apply")
class FriendApply
{
    public:
    FriendApply() {}
    FriendApply(const std::string& eid,
    const std::string& uid,
    const std::string& pid) :_event_id(eid),_user_id(uid),_peer_id(pid) {}

    std::string event_id() { return _event_id; }
    void set_event_id(const std::string& event_id) { _event_id = event_id; }

    std::string user_id() { return _user_id; }
    void set_user_id(const std::string& user_id) { _user_id = user_id; }

       std::string peer_id() { return _peer_id; }
    void set_peer_id(const std::string& peer_id) { _peer_id = peer_id; }

    ~FriendApply() {}


    private:
    friend class odb::access;
    #pragma db id auto
    unsigned long _id;
    #pragma db type("varchar(64)") index unique
    std::string _event_id;
    #pragma db type("varchar(64)") index 
    std::string _user_id;
    #pragma db type("varchar(64)") index 
    std::string _peer_id;
};